package com.StarStudio.Service.Impl;

import com.StarStudio.Service.MeteorologyService;
import com.StarStudio.Domain.Meteorology;
import com.StarStudio.Mapper.MeteorologyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MeteorologyServiceImpl implements MeteorologyService {

    @Autowired
    private MeteorologyMapper meteorologyMapper;

    /**
     * 根据地块ID获取全部数据
     * @param zoneId
     * @return
     */
    @Override
    public List<Meteorology> getAllByZoneId(int zoneId) {
        return meteorologyMapper.getAllByZoneId(zoneId);
    }

    /**
     * 获取最新插入的一条数据
     * @param zoneId
     * @return
     */
    @Override
    public Meteorology getOneByZoneId(int zoneId) {
        return meteorologyMapper.getOneByZoneId(zoneId);
    }

    @Override
    public void add(Meteorology meteorology) {
        //meteorologyMapper.add(meteorology);
       // meteorologyMapper.addToZone_Meteorology(, meteorology.getMeteorologyId());
    }

    @Override
    public void update(Meteorology meteorology) {

    }

    @Override
    public void delete(Integer meteorologyId) {

    }


}
